async function async1() {
  console.log('async1 start');
  /**
   * 这里理解await 可以这样理解
   * 把她描述的函数放在Promise里面 把它后面所有的放在then
   * == new Promise(() => {
   * async2()
   * }).then(() => {
   * console.log('async1 end');
   * ······
   * })
   */
  await async2();
  console.log('async1 end');
  // ······
}

async function async2() {
  console.log('async2');
}

console.log('script start');

setTimeout(() => {
  console.log('setTimeOut')
}, 0);

async1();

new Promise(function (resolve) {
  console.log('promise1');
  resolve();
}).then(function() {
  console.log('promise2')
});

console.log('script end');

// script start - async1 start - promise1 - script end - async2 - async1 end - setTimeOut - promise2

// 正解：

// script start
// async1 start
// async2
// promise1
// script end
// async1 end
// promise2
// setTimeOut